#pragma once

#include "Agent.h"
#include "Node.h"
#include "BearAgent.h"
#include "BunnyAgent.h"
#include "WolfAgent.h"
#include "Player.h"

class AgentManager
{
	public:
		//enum Animals
		//{
		//	Bunny,
		//	Wolf,
		//	Bear
		//};

		static AgentManager* GetInstance();
		void Destroy();
		
		void Initialize(std::vector<std::vector<Node*>> &pGrid);
		void Cleanup();
		void Update(float pDeltaTime);

		void AddAgent(Agent* pAgent);
		void DeleteAgent(Agent* pAgent);
		void SpawnAnimal(Animals pAnimal);
		void SpawnAnimal(Animals pAnimal, Node* pNode);

		void SetPlayer(Player* pPlayer){ m_xPlayer = pPlayer; }
		Player* GetPlayer(){ return m_xPlayer; }

	private:
		AgentManager();
		~AgentManager();

		static AgentManager* m_xInstance;

		std::vector<Agent*> m_vAgents;
		int m_iBunnies;
		int m_iWolves;
		int m_iBears;

		Player* m_xPlayer;

		std::vector<std::vector<Node*>> Grid;
};

